<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>左边页面</TITLE>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="${base}/scripts/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<link rel="stylesheet" href="${base}/css/tree.css" type="text/css">
<script type="text/javascript" src="${base}/scripts/plugins/jquery-1.7.1.js"></script>
<script type="text/javascript" src="${base}/scripts/ztree/js/jquery.ztree.core-3.1.js"></script>
<script type="text/javascript">

	var zNodes = [
		<#list roleUrlList as roleUrl>
			<#if (roleUrl.isShow) == 1>
			{
				id : ${(roleUrl.id)!0}, 
				pId :${(roleUrl.parentId)!0}, 
				name : "${(roleUrl.name)!''}", 
				open : false,
				url : "${base}/${(roleUrl.url)!''}",
				target:"frmright"
			}<#if roleUrl_index != (roleUrlList?size - 1)>
				,
			</#if>
			</#if>
		</#list>
	];

	var setting = {
		data: {
			simpleData: {
				enable: true
			}
		}, 
		callback: {
			onClick: onClick
		}
	};
	
	function onClick(e,treeId, treeNode) {
		var zTree = $.fn.zTree.getZTreeObj("treeDemo");
		var defaultUrl = "${base}/admin/open.action";
		if ((treeNode.isParent) && (treeNode.url == defaultUrl)) {
			zTree.expandNode(treeNode, true, true, true);
		}
	}
	
	$(document).ready(function(){
		$.fn.zTree.init($("#treeDemo"), setting, zNodes);
	});
</script>
</head>
<body>
<div style="text-align:center;">
	<div>
		<ul id="treeDemo" class="ztree"></ul>
	</div>
</div>
</body>
</html>